package com.atguigu.gmall_sugar.service;

import com.atguigu.gmall_sugar.bean.ProductStats;
import com.atguigu.gmall_sugar.mapper.ProductStatsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @ClassName: ProductStatsServiceImp
 * @Description:
 * @Author: kele
 * @Date: 2021/4/28 16:31
 **/
@Service
public class ProductStatsServiceImp implements ProductStatsService{

    @Autowired
    ProductStatsMapper productStats;

    @Override
    public BigDecimal getGMV(int date) {
        return productStats.getGMV(date);
    }


    @Override
    public List<ProductStats> getProductStatsByTM(int date, int limit) {
        return productStats.getProductStatsByTM(date,limit);
    }

    @Override
    public List<ProductStats> getProductStatsBySpu(int date, int limit) {
        return productStats.getProductStatsBySpu(date,limit);
    }

    @Override
    public List<ProductStats> getProductStatsByCategory(int date, int limit) {
        return productStats.getProductStatsByCategory(date,limit);
    }
}
